<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="../jsLib/angular-1.3.0.js"></script>
    <title></title>
</head>
<body ng-app="app">
    <div ng-controller="control">
     <p >{{aa}}</p>
    </div>
    <script>
        var app=angular.module('app',[]);
        app.factory('timeOut',function(){
            return {
                timeOut:function(fun){
                  setTimeout(function(){
                      fun();
                  },100)
                }
            }
        })
        var control = function($scope,timeOut){
            $scope.aa="hello world";
            timeOut.timeOut(function(){$scope.aa="aaaaaaaa"})
        }
    </script>
</body>
</html>